package com.aspose.cells.b.a.b.a.a;

import java.awt.geom.AffineTransform;
import java.awt.geom.PathIterator;

public class zb implements PathIterator, Cloneable {
   private int a = 0;
   private int b = 0;
   private za c;
   private AffineTransform d;
   private static final int[] e = new int[]{2, 2, 4, 6, 0};

   public zb(za var1, AffineTransform var2) {
      this.c = var1;
      this.d = var2;
   }

   public int getWindingRule() {
      return this.c.i();
   }

   public boolean isDone() {
      return this.a >= this.c.c();
   }

   public void next() {
      int var1 = this.c.a()[this.a++] & 7;
      this.b += e[var1];
   }

   public int currentSegment(float[] coords) {
      int var2 = this.c.a()[this.a] & 7;
      int var3 = e[var2];
      if (var3 > 0 && this.d != null) {
         this.d.transform(this.c.b(), this.b, coords, 0, var3 / 2);
      } else {
         System.arraycopy(this.c.b(), this.b, coords, 0, var3);
      }

      return var2;
   }

   public int currentSegment(double[] coords) {
      int var2 = this.c.a()[this.a] & 7;
      int var3 = e[var2];
      if (var3 > 0 && this.d != null) {
         this.d.transform(this.c.b(), this.b, coords, 0, var3 / 2);
      } else {
         for(int var4 = 0; var4 < var3; ++var4) {
            coords[var4] = (double)this.c.b()[this.b + var4];
         }
      }

      return var2;
   }
}
